<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>My Orders</title>
    <link rel="StyleSheet" href="../css/jpetstore.css" type="text/css" media="screen"/>

</head>
<body >
    <div th:replace="common/Top"></div>

    <div id="Content">
        <div id="BackLink">
            <a href="/catalog/view">Return to Main Menu</a>
        </div>

        <div id="Catalog">
            <h2>My Orders</h2>

            <table>
                <tr>
                    <th>Order ID</th>
                    <th>Date</th>
                    <th>Total Price</th>
                    <th>Shipping Address</th>
                    <th>Order State</th>
                </tr>

                <tr th:each="order:${session.orderList}">
                    <td th:text="${order.orderId}"></td>
                    <td th:text="${#dates.format(order.orderDate, 'yyyy/MM/dd hh:mm:ss')}"><</td>
                    <td th:text="'$'+${#numbers.formatDecimal(order.totalPrice,0,'COMMA',2,'POINT')}"></td>
                    <th th:text="${order.shipAddress1}"></th>
                    <td th:text="${order.status}"></td>
                </tr>
            </table>
        </div>
    </div>

    <div th:replace="common/Bottom"></div>
</body>
</html>